YuNetsurf v3.0.0 for D6-XE10
YuNetSurf is a HTML5 parser and tree builder with CSS3 tokeniser, parser, and selection engine for Delphi (Embarcadero / CodeGear / Borland).
HTML Parser and Tree Builder
- Parse HTML, good and bad.
- HTML5 tokeniser with SAX-style events.
- Flexible tree builder API for custom DOM implementations.
- Readily provided HTML5 parser classes convert HTML documents into DOM trees:
- Simple DOM tree: Fast and efficient.
- LibXml2 tree: Fully compatible with LibXml2 functions, including XPATH and LibXslt transformation.
- XDOM tree: Feasability study limited by XDOM restrictions.
CSS Parser and Selection Engine
- Parse CSS, good and bad.
- Apply CSS rules to DOM nodes:
- CSS2 and CSS3 selectors.
- Handle most CSS2 as well as some CSS3 properties.
- Simple DOM tree.
- LibXml2 tree.
Usage Scenarios
- Extract information from HTML documents:
- Locate HTML elements based on their tag names, attribute names or CSS properties.
- Extract values of attributes from elements.
- Find the n-th sibling or child element parsed data.
- Add, change, or remove attributes of elements.
- Manipulate the inner content of elements.
- Wrap element content inside new elements.
YuNetsurf 3.0.0 – 25 Mar 2016
Incompatibility Change:
Optimize the way to handle CSS presentational hints: Previously, the CSS selection engine iterated over all properties not either in a UA stylesheet or a user stylesheet with !important set. It asked the client if there were any presentational hints for that node, once for each property. This triggered up to N_PROPERTIES * N_NODES calls to the client.
The new API asks the client to supply a list of all the presentational hints that apply to node, which is 0 for most nodes. This triggers at most N_NODES calls to the client. css_hint has been changed to include the property which the hint applies to.
Wrapper classes have been adjusted as well:
- TYuSimpleCss.OnNodePresentationalHint
- TYuLibXml2Css.OnNodePresentationalHint
Because of this incompatible API change, the YuNetSurf major version incremented to 3.
New Functions:
- Add lwc_string_tolower API.